﻿#ifndef CLOCKFRAGMENT_H
#define CLOCKFRAGMENT_H

#include <QWidget>
#include "mclock.h"
#include <QMap>
#include <QGridLayout>
#include <QTextToSpeech>
namespace Ui {
class ClockFragment;
}

class ClockFragment : public QWidget
{
    Q_OBJECT

public:
    explicit ClockFragment(QWidget *parent = nullptr);
    ~ClockFragment();

private slots:
    void on_pushButton_clicked();
    void timeout();
    void on_pushButton_2_clicked();

private:
    Ui::ClockFragment *ui;
    QMap<QString,Clock> clocks;
    QGridLayout *layout;//我没释放内存
    QTimer timer;
    QTextToSpeech tts;
    QMap<QString,bool> showed;
};

#endif // CLOCKFRAGMENT_H
